package com.foryou.system.common.validator;

import com.foryou.system.common.exception.RollbackException;
import org.apache.commons.lang.StringUtils;

/**
 * 数据校验
 * Created by LJX
 * 2017/12/16 0016 下午 9:43
 */
public abstract class Assert {

    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new RollbackException(message);
        }
    }

    public static void isNull(Object object, String message) {
        if (object == null) {
            throw new RollbackException(message);
        }
    }
}
